The Campaign object

Attributes

id string

Unique identifier for the object.

created_at string

ISO 8601 timestamp of when the object was created.

updated_at string

ISO 8601 timestamp of when the object was last updated.

campaign_name string required
description string
The Campaign object
{
  "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"
}
GET /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

id string required

The identifier of the campaign to retrieve.

Returns

Returns the campaign object if a valid identifier was provided.

GET /api/crm/campaign/{id}
curl https://api.overplane.dev/api/crm/campaign/campaign_abc123 \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "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"
}
GET /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

limit integer

Maximum number of objects to return. Default: 20.

offset integer

Number of objects to skip for pagination. Default: 0.

Returns

A paginated list of campaign objects.

GET /api/crm/campaign
curl https://api.overplane.dev/api/crm/campaign \
  -H "Authorization: Bearer sk_test_..."
Response
{
  "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
}
POST /api/crm/campaign

Create a campaign

Creates a new campaign object.

Body parameters

campaign_name string required
description string

Returns

Returns the newly created campaign object if the call succeeded.

POST /api/crm/campaign
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"}'
Response
{
  "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"
}
PATCH /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

id string required

The identifier of the campaign to update.

Body parameters

campaign_name string
description string

Returns

Returns the updated campaign object.

PATCH /api/crm/campaign/{id}
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"}'
Response
{
  "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"
}
DELETE /api/crm/campaign/{id}

Delete a campaign

Permanently deletes a campaign. This cannot be undone.

Path parameters

id string required

The identifier of the campaign to delete.

Returns

Returns a confirmation that the campaign has been deleted.

DELETE /api/crm/campaign/{id}
curl https://api.overplane.dev/api/crm/campaign/campaign_abc123 \
  -H "Authorization: Bearer sk_test_..." \
  -X DELETE
Response
{
  "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

idx integer
campaign_id string required
send_after_days integer required
email_template string required

Endpoints

GET /api/crm/campaign-email-schedule?parent_id={id}
POST /api/crm/campaign-email-schedule
PATCH /api/crm/campaign-email-schedule/{id}
DELETE /api/crm/campaign-email-schedule/{id}
POST /api/crm/campaign-email-schedule/reorder
Campaign Email Schedule object
{
  "id": "campaign-email-schedule_abc123",
  "idx": 1,
  "campaign_id": "campaign_id_example",
  "send_after_days": 0,
  "email_template": "user@example.com"
}