# Create a new batch of profiles with scheduling

Creates a new batch of profiles with scheduling information.

This endpoint has a special rate limit of 10 requests per minute per group.

#### Errors

This endpoint may fail with a validation error (HTTP 422). See the Errors section for details on error response format.

Common validation errors include: Duplicate or non-unique external_id, invalid phone number / email address format

Endpoint: POST /v1/groups/{GROUP_ID}/batches
Version: 2.0.1
Security: BearerAuth

## Path parameters:

  - `GROUP_ID` (string, required)
    The unique identifier of the group

## Request fields (application/json):

  - `profile_tag` (any)
    Optional. Profile tag information for the batch. If missing, a new one will be created automatically.

  - `profiles` (array, required)
    Array of profile objects to be created in this batch.
Limit: You can include up to 50 profiles in a single request.

  - `profiles.external_id` (string,null)
    External identifier for the profile. Must be unique within your organization.

  - `profiles.person` (object, required)

  - `profiles.person.first_name` (string,null)
    First name of the person.

  - `profiles.person.last_name` (string,null)
    Last name of the person.

  - `profiles.person.email_address` (string,null)
    Email address of the person.

  - `profiles.person.phone_number` (string,null)
    Phone number of the person in international format (e.g., +35840123456).

  - `profiles.attributes` (array)
    Optional. Array of custom attributes for the profile.

By default, any attribute that does not already exist will be created automatically.

If fail_on_missing_attributes is set to true, then all attributes listed here must already exist in the system (created via the UI or API); otherwise, the request will fail with a validation error.

  - `profiles.attributes.name` (string, required)
    Name of the attribute. Must only contain English letters, numbers, underscores (_), or hyphens (-). No spaces or other special characters allowed.

  - `profiles.attributes.value` (string, required)
    Value of the attribute.

  - `schedule` (object)
    Optional. Scheduling information for the batch. If omitted, the batch will be imported without scheduling.

  - `schedule.start_at` (string)
    Optional. When to start the scheduled campaign in UTC. Format 'YYYY-MM-DD HH:MM:SS'. If missing, the campaign will start immediately.

  - `schedule.calls_per_minute` (integer,null)
    Optional. The maximum number of calls per minute for the scheduled campaign. Must be between 1 and 60. If omitted, the default rate will be used.

  - `schedule.campaign` (any)
    Campaign information for scheduling. Either uuid or name must be provided, but not both.

  - `fail_on_missing_attributes` (boolean)
    If true, all attributes must already exist in the system.
If any attribute does not exist (i.e., has not been created from the UI or via the API), the request will fail with a validation errors.

If false or omitted, all missing attributes will be created automatically.

## Response 200 fields (application/json):

  - `metadata` (array)
    Metadata associated with the batch
    Example: []

  - `profiles` (array)
    List of profiles created in this batch
    Example: [{"external_id":"0000012","uuid":"9ed84352-3e00-4fa0-9705-27f566205d5f"}]

  - `profiles.external_id` (string,null)
    External identifier for the profile. Unique within your organization.

  - `profiles.uuid` (string)
    UUID of the created profile

  - `uuid` (string)
    UUID of the created batch
    Example: "9ed84352-4652-4892-9fdc-cd0e1738d432"

  - `updated_at` (string)
    Timestamp when the batch was last updated
    Example: "2025-05-06T07:33:15.000000Z"

  - `created_at` (string)
    Timestamp when the batch was created
    Example: "2025-05-06T07:33:15.000000Z"

  - `group` (object)
    Information about the group this batch belongs to.

  - `group.uuid` (string)
    UUID of the group

  - `group.metadata` (array)
    Metadata associated with the group

  - `group.name` (string)
    Name of the group

  - `group.created_at` (string)
    Timestamp when the group was created

  - `group.updated_at` (string)
    Timestamp when the group was last updated

  - `group.deleted_at` (string,null)
    Timestamp when the group was deleted (if applicable)

  - `group.type` (object)
    Type information for the group.

  - `group.type.uuid` (string)
    UUID of the group type

  - `group.type.name` (string)
    Name of the group type

  - `group.type.created_at` (string)
    Timestamp when the group type was created

  - `group.type.updated_at` (string)
    Timestamp when the group type was last updated

  - `group.type.deleted_at` (string,null)
    Timestamp when the group type was deleted (if applicable)

  - `campaign` (object,null)
    Information about a campaign.

  - `campaign.uuid` (string)
    UUID of the campaign

  - `campaign.status` (string)
    Status of the campaign
    Enum: "tested", "untested"

  - `campaign.name` (string)
    Name of the campaign

  - `campaign.description` (string)
    Description of the campaign

  - `campaign.metadata` (array)
    Metadata associated with the campaign

  - `campaign.created_at` (string)
    Timestamp when the campaign was created

  - `campaign.updated_at` (string)
    Timestamp when the campaign was last updated

  - `campaign.deleted_at` (string,null)
    Timestamp when the campaign was deleted (if applicable)

  - `campaign.hidden_at` (string,null)
    Timestamp when the campaign was hidden (if applicable)

  - `campaign.view` (string)
    View type of the campaign
    Enum: "broadcast", "sequence"

  - `campaign.revision` (integer)
    Revision number of the campaign

  - `profile_tag` (object)
    Information about the profile tag for this batch. In the Optimized.App UI, a profile tag is referred to as a "Contact list". If this field is not provided, a new Contact list will be created automatically and a name will be generated by the system. Use this object to associate the batch with an existing Contact list or to create a new one with a custom name.

  - `profile_tag.name` (string)
    Name of the profile tag (Contact list)

  - `profile_tag.type` (string)
    Type of the profile tag
    Enum: "basic", "hidden"

  - `profile_tag.is_anonymized` (boolean)
    Indicates whether all profile data in this profile tag (Contact list) is currently anonymized. If true, all profiles associated with this tag have their personally identifiable information anonymized.

  - `profile_tag.uuid` (string)
    UUID of the profile tag

  - `profile_tag.updated_at` (string)
    Timestamp when the profile tag was last updated

  - `profile_tag.created_at` (string)
    Timestamp when the profile tag was created

  - `schedule` (object,null)
    Information about the schedule if included (null if no schedule was set).

  - `schedule.metadata` (array)
    Metadata associated with the schedule

  - `schedule.status` (string)
    Status of the schedule
    Enum: "scheduled"

  - `schedule.start_at` (string)
    Timestamp when the schedule starts

  - `schedule.uuid` (string)
    UUID of the schedule

  - `schedule.updated_at` (string)
    Timestamp when the schedule was last updated

  - `schedule.created_at` (string)
    Timestamp when the schedule was created


