Audiences

Import CSV rows into an audience

post/public/v1/audiences/{audienceId}/import

Path parameters

audienceIdstring cuid required
Example:example

Request body

filenamestring required
rowsobject[] required

Example request

{
  "filename": "example"
}

Response

Audience import enqueued

Example response

{
  "audience": {
    "id": "example",
    "name": "example",
    "description": "example",
    "status": "DRAFT",
    "source": "FILTER",
    "recordTypes": [
      1
    ],
    "recordTypeQueries": [
      {
        "recordTypeId": 1
      }
    ],
    "search": "example",
    "revision": 1,
    "createdBy": {
      "id": 1,
      "firstName": "example",
      "lastName": "example",
      "avatar": "example"
    },
    "imports": [
      {
        "id": "example",
        "audienceId": "example",
        "filename": "example",
        "disposition": "INCLUDE",
        "status": "PENDING",
        "totalRows": 1,
        "createdRows": 1,
        "linkedRows": 1,
        "completedRows": 1,
        "rejectedRows": 1,
        "error": "example",
        "createdAt": "2024-01-01T12:00:00.000Z",
        "startedAt": "2024-01-01T12:00:00.000Z",
        "completedAt": "2024-01-01T12:00:00.000Z",
        "updatedAt": "2024-01-01T12:00:00.000Z"
      }
    ],
    "importBatches": [
      {
        "id": "example",
        "audienceId": "example",
        "status": "PENDING",
        "version": 1,
        "error": "example",
        "imports": [
          {
            "id": "example",
            "audienceId": "example",
            "filename": "example",
            "disposition": "INCLUDE",
            "status": "PENDING",
            "totalRows": 1,
            "createdRows": 1,
            "linkedRows": 1,
            "completedRows": 1,
            "rejectedRows": 1,
            "error": "example",
            "createdAt": "2024-01-01T12:00:00.000Z",
            "startedAt": "2024-01-01T12:00:00.000Z",
            "completedAt": "2024-01-01T12:00:00.000Z",
            "updatedAt": "2024-01-01T12:00:00.000Z"
          }
        ],
        "cancelRequestedAt": "2024-01-01T12:00:00.000Z",
        "startedAt": "2024-01-01T12:00:00.000Z",
        "completedAt": "2024-01-01T12:00:00.000Z",
        "createdAt": "2024-01-01T12:00:00.000Z",
        "updatedAt": "2024-01-01T12:00:00.000Z"
      }
    ],
    "createdAt": "2024-01-01T12:00:00.000Z",
    "updatedAt": "2024-01-01T12:00:00.000Z"
  },
  "import": {
    "id": "example",
    "audienceId": "example",
    "filename": "example",
    "disposition": "INCLUDE",
    "status": "PENDING",
    "totalRows": 1,
    "createdRows": 1,
    "linkedRows": 1,
    "completedRows": 1,
    "rejectedRows": 1,
    "error": "example",
    "createdAt": "2024-01-01T12:00:00.000Z",
    "startedAt": "2024-01-01T12:00:00.000Z",
    "completedAt": "2024-01-01T12:00:00.000Z",
    "updatedAt": "2024-01-01T12:00:00.000Z"
  }
}

Changes

Changed in 1 of the 2 revisions of this API.1