PublicApiCreateDirectEmail
curl --request POST \
--url https://sandbox.api.app.firstsales.io/api/v1/organizations/{orgId}/workspaces/{wsId}/contacts/{contactId}/emails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"connectorId": "<string>",
"subject": "<string>",
"body": "<string>",
"cc": [],
"bcc": [],
"mode": "send",
"allowDuringSequence": true,
"scheduledAt": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
connectorId: '<string>',
subject: '<string>',
body: JSON.stringify('<string>'),
cc: [],
bcc: [],
mode: 'send',
allowDuringSequence: true,
scheduledAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://sandbox.api.app.firstsales.io/api/v1/organizations/{orgId}/workspaces/{wsId}/contacts/{contactId}/emails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"email": {
"id": "<string>",
"contactId": "<string>",
"status": "draft",
"cc": [
"<string>"
],
"bcc": [
"<string>"
],
"cancelledReason": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"subject": "<string>",
"recipientEmail": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}Direct Email
PublicApiCreateDirectEmail
POST /api/v1/organizations//workspaces//contacts//emails
POST
/
api
/
v1
/
organizations
/
{orgId}
/
workspaces
/
{wsId}
/
contacts
/
{contactId}
/
emails
PublicApiCreateDirectEmail
curl --request POST \
--url https://sandbox.api.app.firstsales.io/api/v1/organizations/{orgId}/workspaces/{wsId}/contacts/{contactId}/emails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"connectorId": "<string>",
"subject": "<string>",
"body": "<string>",
"cc": [],
"bcc": [],
"mode": "send",
"allowDuringSequence": true,
"scheduledAt": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
connectorId: '<string>',
subject: '<string>',
body: JSON.stringify('<string>'),
cc: [],
bcc: [],
mode: 'send',
allowDuringSequence: true,
scheduledAt: '2023-11-07T05:31:56Z'
})
};
fetch('https://sandbox.api.app.firstsales.io/api/v1/organizations/{orgId}/workspaces/{wsId}/contacts/{contactId}/emails', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"email": {
"id": "<string>",
"contactId": "<string>",
"status": "draft",
"cc": [
"<string>"
],
"bcc": [
"<string>"
],
"cancelledReason": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"subject": "<string>",
"recipientEmail": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}Use this endpoint through the Developer API or the matching
firstsales CLI command when available. Responses use the stable FirstSales public error envelope.Authorizations
FirstSales developer API key bearer token (fs-key-*).
Headers
Required string length:
8 - 200Path Parameters
Minimum string length:
1Minimum string length:
1Pattern:
^[a-f0-9]{24}$Body
application/json
Required string length:
1 - 300Required string length:
1 - 50000Maximum array length:
10Pattern:
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Maximum array length:
5Pattern:
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Available options:
send, schedule, draft Available options:
html, text Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Response
Successful response
Show child attributes
Show child attributes