Back to reference

API Reference

Reorder audiences

Reorders audiences within exactly one folder or the ungrouped area. Set folderId to null for ungrouped audiences. Supplied audiences move to the front in the requested order; omitted audiences retain their current relative order afterward. To place an item at an arbitrary position instead of the front, read the location and send its complete desired audience ID order.

PATCH/v1/accounts/{accountGroupId}/audiences/reorder

Integration notes

Required API permission

audiences:write.

Prerequisites

integration_api_key, account_group_access.

Idempotency

not supported; check the current resource state before retrying this request.

Parameters

accountGroupIdPath

Type: string

Account group ID that scopes the request.

Required

Request body

Required

Optional

Content types

application/json

Schema

object

Fields

folderId

Type: unknown

Folder ID used to place or move the audience.

Required

audienceIds

Type: array<string>

Request field for audience ids.

Required

Responses

200

Audience order updated

Schema: AudienceNavigationSuccessResponse

400

Request validation failed

Schema: ValidationErrorResponse

401

Invalid or missing API key

Schema: ErrorResponse

403

Missing required permission

Schema: ErrorResponse

409

One of the audiences is still being populated by an active prospecting job

Schema: ErrorResponse

422

One or more audience IDs do not belong to the requested location

Schema: ErrorResponse

429

Rate limit exceeded

Schema: ErrorResponse

500

Internal server error

Schema: ErrorResponse

Response examples

200 Example JSONAudienceNavigationSuccessResponse
{
    "success": true,
    "data": {
        "folders": [
            {
                "id": "507f1f77bcf86cd799439011",
                "name": "Avery Stone",
                "audienceType": "on_demand",
                "isPinned": true,
                "position": 25,
                "createdAt": "string",
                "updatedAt": "string",
                "audiences": [
                    {
                        "id": "507f1f77bcf86cd799439011",
                        "name": "Avery Stone",
                        "type": "string",
                        "description": "string",
                        "folderId": "507f1f77bcf86cd799439011",
                        "position": "string",
                        "prospectCount": "string",
                        "createdAt": "string",
                        "updatedAt": "string"
                    }
                ]
            }
        ],
        "ungroupedAudiences": [
            {
                "id": "507f1f77bcf86cd799439011",
                "name": "Avery Stone",
                "type": "linkedin_search",
                "description": "string",
                "folderId": "507f1f77bcf86cd799439011",
                "position": 25,
                "prospectCount": 25,
                "createdAt": "string",
                "updatedAt": "string"
            }
        ]
    },
    "error": null,
    "traceId": "507f1f77bcf86cd799439011"
}
400 Example JSONValidationErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "VALIDATION_ERROR",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
401 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
403 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
409 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
422 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
429 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
500 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}