Skip to content
Norbelys
Esc
↑↓navigate↵open⌘Jpreview

Import people from a CSV file (the body, `Content-Type: text/csv`, at most 16 MiB, its first record the header; `group_id` as a query parameter) or from JSON (`people`, up to 1,000). The import runs as a job: poll the import, or listen for `import.completed`.

POST/v1/imports
Authorization
AuthorizationBearer token · headerrequired

An API key (nb_live_…, nb_test_…), a workspace token (nbs_…) or a CLI token (nbc_…).

Query parameters
group_idstring

With a CSV body: the group every imported person joins (grp_…).

Header parameters
Idempotency-Keystringrequired

A stable key for this logical request; reuse it when retrying.

min length 1 · max length 128 · matches ^[!-~]+$
Request body
requiredapplication/json
group_idstring | null

The group every imported person joins.

peopleobject[]required

1 to 1,000 people, each {email, given_name?, family_name?, company?, fields?}; each is checked by the import, which reports the invalid ones.

Responses
202

The import, queued; Location names it.

completed_atTimestamp | null
Show properties
One of:
Timestamp
string<date-time>
null
null
countsCountsrequired

An import's rows so far.

Show properties
importedinteger<int64>required

Rows that created a person or merged into one.

invalidinteger<int64>required

Rows that could not describe a person.

skippedinteger<int64>required

Rows whose address an earlier row of the file already imported.

totalinteger<int64>required

Rows read.

created_atTimestamprequired
errorsErrorsrequired

An import's problems: a first page and the report.

Show properties
dataRowProblem[]required

One problem per invalid row, the first 100.

max items 100
Show properties
Array of RowProblem
fieldstringrequired

The column or attribute at fault (email, fields.industry, …).

problemstringrequired
rowinteger<int64>required

The row: in a CSV file, its position as a spreadsheet numbers it (the header is row 1); in a JSON import, the person's position in people (from 1).

has_morebooleanrequired

True when more rows are invalid than data shows.

urlstring | null

A CSV of every problem of every invalid row (row,field,problem), once the import completed; the link works for 15 minutes from this read.

formatstringrequired

csv or json.

group_idstring | null

The group every imported person joins.

idId_Importrequired
matches ^imp_[0-9a-f]{32}$
job_idstring | null

The job doing the work.

last_errorLastError | null
Show properties
One of:
LastError
atTimestamprequired

When the job's row last changed: the moment of the error for a job that ended, and at or after it while the job is still waiting or running (the row keeps no separate time for its error).

codestringrequired

A short machine-readable code (error, lease_expired, unknown_kind, cancelled, …).

detailstringrequired

A human-readable explanation.

null
null
statusstringrequired

queued, processing, completed or failed. New values may be added.

updated_atTimestamprequired
401

No valid credential.

codestringrequired

The code from the closed registry; programs branch on it, never on the text. New codes may be added.

detailstringrequired

What went wrong, for a person; never an internal cause.

errorsFieldError[]

With validation_failed only: every invalid field.

Show properties
Array of FieldError
codestringrequired

What is wrong (required, range, length, format, invalid, …).

detailstringrequired

A safe, human-readable explanation.

pointerstringrequired

RFC 6901 pointer into the body, or ?name for a query parameter.

instancestringrequired

The request's path.

request_idstringrequired

The request's id, also in X-Request-Id: what support needs to find the request.

retry_afterinteger<int64> | null

With 429 and 503: the seconds to wait, as in Retry-After.

min 0
statusinteger<int32>required

The HTTP status.

min 0
titlestringrequired

Fixed per code.

typestringrequired

https://docs.norbelys.com/errors/<code>, a page that explains the code.

403

The credential lacks people:write.

codestringrequired

The code from the closed registry; programs branch on it, never on the text. New codes may be added.

detailstringrequired

What went wrong, for a person; never an internal cause.

errorsFieldError[]

With validation_failed only: every invalid field.

Show properties
Array of FieldError
codestringrequired

What is wrong (required, range, length, format, invalid, …).

detailstringrequired

A safe, human-readable explanation.

pointerstringrequired

RFC 6901 pointer into the body, or ?name for a query parameter.

instancestringrequired

The request's path.

request_idstringrequired

The request's id, also in X-Request-Id: what support needs to find the request.

retry_afterinteger<int64> | null

With 429 and 503: the seconds to wait, as in Retry-After.

min 0
statusinteger<int32>required

The HTTP status.

min 0
titlestringrequired

Fixed per code.

typestringrequired

https://docs.norbelys.com/errors/<code>, a page that explains the code.

404

The group does not exist (not_found).

codestringrequired

The code from the closed registry; programs branch on it, never on the text. New codes may be added.

detailstringrequired

What went wrong, for a person; never an internal cause.

errorsFieldError[]

With validation_failed only: every invalid field.

Show properties
Array of FieldError
codestringrequired

What is wrong (required, range, length, format, invalid, …).

detailstringrequired

A safe, human-readable explanation.

pointerstringrequired

RFC 6901 pointer into the body, or ?name for a query parameter.

instancestringrequired

The request's path.

request_idstringrequired

The request's id, also in X-Request-Id: what support needs to find the request.

retry_afterinteger<int64> | null

With 429 and 503: the seconds to wait, as in Retry-After.

min 0
statusinteger<int32>required

The HTTP status.

min 0
titlestringrequired

Fixed per code.

typestringrequired

https://docs.norbelys.com/errors/<code>, a page that explains the code.

413

The file is larger than 16 MiB.

codestringrequired

The code from the closed registry; programs branch on it, never on the text. New codes may be added.

detailstringrequired

What went wrong, for a person; never an internal cause.

errorsFieldError[]

With validation_failed only: every invalid field.

Show properties
Array of FieldError
codestringrequired

What is wrong (required, range, length, format, invalid, …).

detailstringrequired

A safe, human-readable explanation.

pointerstringrequired

RFC 6901 pointer into the body, or ?name for a query parameter.

instancestringrequired

The request's path.

request_idstringrequired

The request's id, also in X-Request-Id: what support needs to find the request.

retry_afterinteger<int64> | null

With 429 and 503: the seconds to wait, as in Retry-After.

min 0
statusinteger<int32>required

The HTTP status.

min 0
titlestringrequired

Fixed per code.

typestringrequired

https://docs.norbelys.com/errors/<code>, a page that explains the code.

415

The body is neither text/csv nor application/json.

codestringrequired

The code from the closed registry; programs branch on it, never on the text. New codes may be added.

detailstringrequired

What went wrong, for a person; never an internal cause.

errorsFieldError[]

With validation_failed only: every invalid field.

Show properties
Array of FieldError
codestringrequired

What is wrong (required, range, length, format, invalid, …).

detailstringrequired

A safe, human-readable explanation.

pointerstringrequired

RFC 6901 pointer into the body, or ?name for a query parameter.

instancestringrequired

The request's path.

request_idstringrequired

The request's id, also in X-Request-Id: what support needs to find the request.

retry_afterinteger<int64> | null

With 429 and 503: the seconds to wait, as in Retry-After.

min 0
statusinteger<int32>required

The HTTP status.

min 0
titlestringrequired

Fixed per code.

typestringrequired

https://docs.norbelys.com/errors/<code>, a page that explains the code.

422

The body is invalid, or the file has no email column.

codestringrequired

The code from the closed registry; programs branch on it, never on the text. New codes may be added.

detailstringrequired

What went wrong, for a person; never an internal cause.

errorsFieldError[]

With validation_failed only: every invalid field.

Show properties
Array of FieldError
codestringrequired

What is wrong (required, range, length, format, invalid, …).

detailstringrequired

A safe, human-readable explanation.

pointerstringrequired

RFC 6901 pointer into the body, or ?name for a query parameter.

instancestringrequired

The request's path.

request_idstringrequired

The request's id, also in X-Request-Id: what support needs to find the request.

retry_afterinteger<int64> | null

With 429 and 503: the seconds to wait, as in Retry-After.

min 0
statusinteger<int32>required

The HTTP status.

min 0
titlestringrequired

Fixed per code.

typestringrequired

https://docs.norbelys.com/errors/<code>, a page that explains the code.

503

Object storage is unavailable; retry with the same key.

codestringrequired

The code from the closed registry; programs branch on it, never on the text. New codes may be added.

detailstringrequired

What went wrong, for a person; never an internal cause.

errorsFieldError[]

With validation_failed only: every invalid field.

Show properties
Array of FieldError
codestringrequired

What is wrong (required, range, length, format, invalid, …).

detailstringrequired

A safe, human-readable explanation.

pointerstringrequired

RFC 6901 pointer into the body, or ?name for a query parameter.

instancestringrequired

The request's path.

request_idstringrequired

The request's id, also in X-Request-Id: what support needs to find the request.

retry_afterinteger<int64> | null

With 429 and 503: the seconds to wait, as in Retry-After.

min 0
statusinteger<int32>required

The HTTP status.

min 0
titlestringrequired

Fixed per code.

typestringrequired

https://docs.norbelys.com/errors/<code>, a page that explains the code.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.norbelys.com/v1/imports' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Idempotency-Key: string' \
  -H 'Content-Type: application/json' \
  -d '{
  "group_id": "grp_0190f8a2b4c87a10b6d2e4f6a8c0e2f4",
  "people": [
    {
      "email": "ada@example.com",
      "fields": {
        "tier": "gold"
      },
      "given_name": "Ada"
    }
  ]
}'
Response
{
  "completed_at": "2019-08-24T14:15:22Z",
  "counts": {
    "imported": 0,
    "invalid": 0,
    "skipped": 0,
    "total": 0
  },
  "created_at": "2019-08-24T14:15:22Z",
  "errors": {
    "data": [
      {
        "field": "string",
        "problem": "string",
        "row": 0
      }
    ],
    "has_more": true,
    "url": "string"
  },
  "format": "string",
  "group_id": "string",
  "id": "imp_0190f8a2b4c87a10b6d2e4f6a8c0e2f4",
  "job_id": "string",
  "last_error": {
    "at": "2019-08-24T14:15:22Z",
    "code": "string",
    "detail": "string"
  },
  "status": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}