The Campaign object
Attributes
Unique identifier for the object.
ISO 8601 timestamp of when the object was created.
ISO 8601 timestamp of when the object was last updated.
{
"id": "campaign_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"campaign_name": "campaign_name_example",
"description": "description_example"
} /api/crm/campaign/{id} Retrieve a campaign
Retrieves the details of an existing campaign. Supply the unique campaign ID that was returned from a previous request.
Path parameters
The identifier of the campaign to retrieve.
Returns
Returns the campaign object if a valid identifier was provided.
curl https://api.overplane.dev/api/crm/campaign/campaign_abc123 \
-H "Authorization: Bearer sk_test_..." {
"id": "campaign_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"campaign_name": "campaign_name_example",
"description": "description_example"
} /api/crm/campaign List all campaigns
Returns a list of campaigns. The results are sorted by creation date, with the most recently created appearing first.
Query parameters
Maximum number of objects to return. Default: 20.
Number of objects to skip for pagination. Default: 0.
Returns
A paginated list of campaign objects.
curl https://api.overplane.dev/api/crm/campaign \
-H "Authorization: Bearer sk_test_..." {
"data": [
{
"id": "campaign_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"campaign_name": "campaign_name_example",
"description": "description_example"
}
],
"has_more": false,
"total": 1
} /api/crm/campaign Create a campaign
Creates a new campaign object.
Body parameters
Returns
Returns the newly created campaign object if the call succeeded.
curl https://api.overplane.dev/api/crm/campaign \
-H "Authorization: Bearer sk_test_..." \
-X POST \
-H "Content-Type: application/json" \
-d '{"campaign_name":"campaign_name_example"}' {
"id": "campaign_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"campaign_name": "campaign_name_example",
"description": "description_example"
} /api/crm/campaign/{id} Update a campaign
Updates the specified campaign by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
Path parameters
The identifier of the campaign to update.
Body parameters
Returns
Returns the updated campaign object.
curl https://api.overplane.dev/api/crm/campaign/campaign_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X PATCH \
-H "Content-Type: application/json" \
-d '{"campaign_name":"campaign_name_example","description":"description_example"}' {
"id": "campaign_abc123",
"created_at": "2024-01-15T09: 30: 00Z",
"updated_at": "2024-01-15T09: 30: 00Z",
"campaign_name": "campaign_name_example",
"description": "description_example"
} /api/crm/campaign/{id} Delete a campaign
Permanently deletes a campaign. This cannot be undone.
Path parameters
The identifier of the campaign to delete.
Returns
Returns a confirmation that the campaign has been deleted.
curl https://api.overplane.dev/api/crm/campaign/campaign_abc123 \
-H "Authorization: Bearer sk_test_..." \
-X DELETE {
"id": "campaign_abc123",
"deleted": true
} Line items
Child objects that belong to this campaign. These are accessed via the parent's ID.
Campaign Email Schedule
Attributes
Endpoints
/api/crm/campaign-email-schedule?parent_id={id} /api/crm/campaign-email-schedule /api/crm/campaign-email-schedule/{id} /api/crm/campaign-email-schedule/{id} /api/crm/campaign-email-schedule/reorder {
"id": "campaign-email-schedule_abc123",
"idx": 1,
"campaign_id": "campaign_id_example",
"send_after_days": 0,
"email_template": "[email protected]"
}