Back to reference

API Reference

Create an audience folder

Creates an audience folder in the account group.

POST/v1/accounts/{accountGroupId}/audiences/folders

Integration notes

Required API permission

audiences:write.

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

name

Type: string

Human-readable name for this resource.

Required

audienceType

Type: on_demand | monitoring

Audience category used to classify the created list.

Required

Responses

201

Audience folder created

Schema: AudienceFolderSuccessResponse

400

Request validation failed

Schema: ValidationErrorResponse

401

Invalid or missing API key

Schema: ErrorResponse

403

Missing required permission

Schema: ErrorResponse

429

Rate limit exceeded

Schema: ErrorResponse

500

Internal server error

Schema: ErrorResponse

Response examples

201 Example JSONAudienceFolderSuccessResponse
{
    "success": true,
    "data": {
        "id": "507f1f77bcf86cd799439011",
        "name": "Avery Stone",
        "audienceType": "on_demand",
        "isPinned": true,
        "position": 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"
}
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"
}