Skip to content
Pitch2SaleDevelopers
Open the app
Early access: these pages are being written and reviewed. Facts in the header boxes come straight from the product.

Log an activity or note on a custom object record

POST
/api/v1/custom-objects/{objectId}/records/{recordId}/activities
curl --request POST \
--url https://api.pitch2sale.com/api/v1/custom-objects/example/records/example/activities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "call", "direction": "inbound", "subject": "example", "body": "example", "body_text": "example", "status": "example", "duration_seconds": 1, "metadata": { "additionalProperty": "example" }, "is_pinned": true, "activity_at": "example", "custom_activity_type_id": "example" }'
objectId
required
string
recordId
required
string
Media typeapplication/json
object
type
required
string
Allowed values: call email email_thread sms whatsapp meeting note task_completed lead_status_change opportunity_status_change lead_merge form_submission custom
direction
Any of:
string
Allowed values: inbound outbound
subject
Any of:
string
<= 500 characters
body
Any of:
string
<= 50000 characters
body_text
Any of:
string
<= 50000 characters
status
Any of:
string
<= 80 characters
duration_seconds
Any of:
integer
metadata
Any of:
object
key
additional properties
is_pinned
boolean
activity_at
string | null
custom_activity_type_id
Any of:
string
/^[0-9a-fA-F]{24}$/

The new activity

Media typeapplication/json
object
activity
required
object
_id
required
string
type
required
string
lead_id
required
string | null
key
additional properties
any
Examplegenerated
{
"activity": {
"_id": "example",
"type": "example",
"lead_id": "example"
}
}

Validation failed

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}

Authentication required or token invalid

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}

Feature not available on the organization plan

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}

Role permission or token scope missing

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}

Rate limit exceeded

Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{
"error": "example",
"code": "example",
"message": "example",
"details": [
{
"field": "example",
"message": "example",
"code": "example"
}
]
}