Documents

Supported document attributes:

AttributeTypeDescription
idnumberUnique identifier of the document.
namestringName of the document.
content_typestringContent type of the document.
sizenumberSize of the document in bytes.
resource_typestringName of the resource type the document is attached to.
Possible values:
  • deal
  • lead
  • contact
  • prospect_and_customer
resource_idnumberId of the resource the document is attached to.
creator_idnumberIdentifier of the user who attached the document.
created_atstringDate and time that the document was attached in UTC (ISO8601 format).

Endpoints

Stream Document

Read the stream of document events.

See the Firehose Overview article for more details on request and response formats and parameters.

Action

GET /v3/documents/stream

Examples

Read the stream of document events

GET /v3/documents/stream?position=tailAccept: application/jsonAuthorization: Bearer $ACCESS_TOKENUser-Agent: $CLIENT_NAME
HTTP/1.1 200 OK   Content-Type: application/json
{  "items": [    {      "data": {        "content_type": "application/pdf",        "size": 5930154,        "resource_type": "deal",        "creator_id": 1098718,        "name": "attachment.pdf",        "resource_id": 7547550,        "created_at": "2018-05-30T12:26:13Z",        "id": 1380001      },      "meta": {        "event_cause": "interaction",        "sequence": 1,        "event_id": "s94S_FMkTFG_cXPiCVv2iQ",        "event_type": "created",        "type": "document",        "event_time": "2018-05-30T12:26:13Z"      }    }  ],  "meta": {    "links": {      "next": "https://api.getbase.com.com/v3/documents/stream?position=ZmlyZWhvc2UuZG9jdW1lbnQuYnlfYWNjb3VudCwwLDMx"    },    "position": "ZmlyZWhvc2UuZG9jdW1lbnQuYnlfYWNjb3VudCwwLDMx",    "top": false  }}