RanklyBee logoRanklyBee
Drafts

Regenerate an outreach draft

Requires the outreach:write scope.

POST
/workspaces/{workspaceId}/sites/{siteId}/drafts/{draftId}/regenerate

Requires the outreach:write scope.

Authorization

bearerAuth
AuthorizationBearer <token>

Use a token created in Settings → API access.

In: header

Path Parameters

workspaceId*string

Workspace ID returned by GET /workspaces.

siteId*string

Site ID returned by GET /workspaces/{workspaceId}/sites.

draftId*string

Header Parameters

Idempotency-Key*string

A stable key for safely retrying this operation.

Length8 <= length <= 120

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

instruction*string
Length3 <= length <= 500

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/workspaces/string/sites/string/drafts/string/regenerate" \  -H "Idempotency-Key: stringst" \  -H "Content-Type: application/json" \  -d '{    "instruction": "string"  }'
{  "ok": true,  "data": {    "id": "string",    "prospectId": "string",    "contactId": "string",    "status": "string",    "purpose": "string",    "starredAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "message": {      "id": "string",      "subject": "string",      "body": "string",      "personalization": {},      "groundingSummary": "string",      "generationProvider": "string",      "generationModel": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    },    "prospect": {      "id": "string",      "title": "string",      "url": "http://example.com",      "domain": "string"    },    "contact": {      "id": "string",      "fullName": "string",      "email": "user@example.com",      "role": "string",      "company": "string"    }  }}