Skip to content

Import contacts

POST/v1/organization/{orgId}/crm/import

US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com

Imports rows or a CSV, matched by email, up to 250 rows a call (send more in several calls). updateExisting: true fills in existing contacts' details from the rows; otherwise they are left as they are. After a discovery, send the chosen rows with source set to the app id. Emails no one. Requires write:crm. Refused for a key restricted to particular events. Also at POST /v1/org/{orgId}/crm/import, and at POST /v1/crm/import with the organization taken from the token.

Request example

Terminal window
curl --request POST \
--url 'https://public-api.sessionboard.com/v1/organization/{orgId}/crm/import' \
--header 'x-access-token: <api-token>' \
--header 'Content-Type: application/json' \
--data '{
"rows": [
{
"email": "jane@example.com",
"first_name": "<string>",
"last_name": "<string>",
"name": "<string>",
"company": "<string>",
"title": "<string>",
"types": [
"speaker"
],
"tags": [
"<string>"
]
}
],
"csv": "<string>",
"mapping": {
"key": "<string>"
},
"types": [
"speaker"
],
"tagIds": [
"<string>"
],
"updateExisting": false,
"source": "<string>",
"target": "people",
"as": "contacts"
}'

Try it

Authorization

Your token stays in this page. It is sent only to the region above and is never saved; it is gone when you leave or reload the page.

Path parameters
Body application/json
POST

Authorizations

  • x-access-tokenstringheader

    Organization API token. Generate from Organization Settings → API Tokens.

  • AuthorizationBearer <token>headeror

    OAuth 2.1 access token. Obtained via the OAuth PKCE flow at /oauth/token.

Send one of these. See Authentication.

Path parameters

  • orgIdstringpathrequired

    Your organization ID. Any other organization returns 404.

Request body

application/jsonrequired

Send rows or csv.

  • rowsCrmImportRowInput | CrmImportCompanyRowInput[]

    People rows (target people, the default) or company rows (target companies).

    Max items
    250
    Option 1 (CrmImportRowInput)

    A row in the import's field keys (the same keys a preview or discovery returns, so its rows can be sent back unchanged).

    • emailstring<email>required
    • first_namestring
    • last_namestring
    • namestring

      A full name, instead of first and last.

    • companystring
    • titlestring
    • typesstring[]
      Allowed values
      "speaker", "sme", "influencer", "exhibitor", "sponsor"
    • tagsstring[]

      Tag names.

    Option 2 (CrmImportCompanyRowInput)

    A company row, sent with target companies. Matched by name; tags mark it a sponsor, an exhibitor or both.

    • namestringrequired
    • websitestring
    • tagsstring[]
      Allowed values
      "sponsor", "exhibitor"
      Max items
      2
  • csvstring

    CSV text with a header row (up to 250 rows on POST …/crm/import).

  • mappingobject

    Column → field (email, first_name, last_name, name, company, title, types, tags), as import/parse suggests. Optional with rows.

  • typesstring[]

    Given to every row.

    Allowed values
    "speaker", "sme", "influencer", "exhibitor", "sponsor"
  • tagIdsstring[]

    Tags given to every row.

  • updateExistingboolean
    Default
    false
  • sourcestring

    Where the rows came from: the app id after apps/{appId}/discover.

  • targetstring

    people (rows: email, names, title, roles, company name, which is found or created and linked) or companies (rows: name, website, tags).

    Allowed values
    "people", "companies"
  • asstring

    Earlier form of target, still accepted.

    Allowed values
    "contacts", "people"
{
"rows": [
{
"email": "jane@example.com",
"first_name": "<string>",
"last_name": "<string>",
"name": "<string>",
"company": "<string>",
"title": "<string>",
"types": [
"speaker"
],
"tags": [
"<string>"
]
}
],
"csv": "<string>",
"mapping": {
"key": "<string>"
},
"types": [
"speaker"
],
"tagIds": [
"<string>"
],
"updateExisting": false,
"source": "<string>",
"target": "people",
"as": "contacts"
}

Responses

200application/json

OK

  • successboolean
  • payloadobject
    Show child attributes
    • createdinteger
    • updatedinteger
    • skippedinteger
    • invalidCrmInvalidRow[]
      Show child attributes
      • lineinteger
      • reasonstring
    • peopleobject[]

      People imports (target people). Each person in the batch with the key the people, pipeline and hand-off operations take, and their Contact id once they are a Contact.

      Show child attributes
      • emailstring
      • keystring

        The person key, e.g. p_… or c_…

      • contact_idstring | null
    • companiesobject[]

      Company imports (target companies). Each company with its id.

      Show child attributes
      • namestring
      • company_idstring | null
      • statusstring
        Allowed values
        "created", "updated"

400application/json

VALIDATION_ERROR: the body or a path id does not match the schema.

  • successboolean
  • errorstring
    Allowed values
    "VALIDATION_ERROR", "SCOPE_REQUIRED", "ORG_WIDE_TOKEN_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "QUOTA_EXCEEDED"
  • codestring

    A more specific reason: exists, read_only, platform_customer.

  • messagestringrequired
  • contactCrmContact

    With code: exists: the contact that has the email.

    Show child attributes
    • idstring
    • first_namestring
    • last_namestring | null
    • namestring
    • emailstring<email>
    • companystring | null
    • titlestring | null

      Job title.

    • avatar_urlstring | null
    • typesstring[]
      Allowed values
      "speaker", "sme", "influencer", "exhibitor", "sponsor"
    • tagsCrmTag[]
      Show child attributes
      • idstring
      • namestring
    • events_countinteger
    • sessions_countinteger
    • last_activity_atstring<date-time> | null
    • activeboolean

      An active contact in the last 365 days.

    • sourcestring | null

      Where the contact came from.

    • created_atstring<date-time>
    • hrefstring

      The contact in Sessionboard CRM.

    • stageobject | null

      The contact's pipeline stage; null when not in the pipeline.

      Show child attributes
      • idstring
      • labelstring

401

Missing, invalid or expired token.

403application/json

  • SCOPE_REQUIRED: the token lacks write:crm (or read:crm for the POSTs that only read).
  • ORG_WIDE_TOKEN_REQUIRED: the key is restricted to particular events.
  • code: plan_read_only (or read_only): the CRM trial or plan has ended; everything can still be read.
  • code: platform_customer: the organization works with Sessionboard on a platform contract, so its contacts are in the Sessionboard platform.
  • code: FEATURE_NOT_ENABLED: contracts are not turned on for the organization (contracts operations only).
  • FORBIDDEN with no code: the token's user lacks the Contacts permission the change needs (connecting and disconnecting apps need an organization admin).
  • successboolean
  • errorstring
    Allowed values
    "VALIDATION_ERROR", "SCOPE_REQUIRED", "ORG_WIDE_TOKEN_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "QUOTA_EXCEEDED"
  • codestring

    A more specific reason: exists, read_only, platform_customer.

  • messagestringrequired
  • contactCrmContact

    With code: exists: the contact that has the email.

    Show child attributes
    • idstring
    • first_namestring
    • last_namestring | null
    • namestring
    • emailstring<email>
    • companystring | null
    • titlestring | null

      Job title.

    • avatar_urlstring | null
    • typesstring[]
      Allowed values
      "speaker", "sme", "influencer", "exhibitor", "sponsor"
    • tagsCrmTag[]
      Show child attributes
      • idstring
      • namestring
    • events_countinteger
    • sessions_countinteger
    • last_activity_atstring<date-time> | null
    • activeboolean

      An active contact in the last 365 days.

    • sourcestring | null

      Where the contact came from.

    • created_atstring<date-time>
    • hrefstring

      The contact in Sessionboard CRM.

    • stageobject | null

      The contact's pipeline stage; null when not in the pipeline.

      Show child attributes
      • idstring
      • labelstring

404application/json

NOT_FOUND: orgId is not the token's organization, or the contact, tag or app is not in it.

  • successboolean
  • errorstring
    Allowed values
    "VALIDATION_ERROR", "SCOPE_REQUIRED", "ORG_WIDE_TOKEN_REQUIRED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "QUOTA_EXCEEDED"
  • codestring

    A more specific reason: exists, read_only, platform_customer.

  • messagestringrequired
  • contactCrmContact

    With code: exists: the contact that has the email.

    Show child attributes
    • idstring
    • first_namestring
    • last_namestring | null
    • namestring
    • emailstring<email>
    • companystring | null
    • titlestring | null

      Job title.

    • avatar_urlstring | null
    • typesstring[]
      Allowed values
      "speaker", "sme", "influencer", "exhibitor", "sponsor"
    • tagsCrmTag[]
      Show child attributes
      • idstring
      • namestring
    • events_countinteger
    • sessions_countinteger
    • last_activity_atstring<date-time> | null
    • activeboolean

      An active contact in the last 365 days.

    • sourcestring | null

      Where the contact came from.

    • created_atstring<date-time>
    • hrefstring

      The contact in Sessionboard CRM.

    • stageobject | null

      The contact's pipeline stage; null when not in the pipeline.

      Show child attributes
      • idstring
      • labelstring

429

The token's request limit (100 requests per 15 minutes by default) or, for writes, its daily write quota. Wait Retry-After seconds.

  • Retry-Afterintegerheader

    Seconds to wait before retrying.

Response examples

{
"success": true,
"payload": {
"created": 123,
"updated": 123,
"skipped": 123,
"invalid": [
{
"line": 123,
"reason": "<string>"
}
],
"people": [
{
"email": "<string>",
"key": "<string>",
"contact_id": "<string>"
}
],
"companies": [
{
"name": "<string>",
"company_id": "<string>",
"status": "created"
}
]
}
}