# Get a batch summary

Retrieve a summary of a batch, including statistics on completed, failed, in-progress, and queued calls.  This provides an overview of the batch execution state and individual call session states.

Endpoint: GET /v2/projects/{projectId}/batches/{batchId}
Version: 2.0.59
Security: BasicAuth, SinchOAuth2

## Security:

  - `BasicAuth` (unknown)
    http basic

  - `SinchOAuth2` (unknown)
    oauth2

## Path parameters:

  - `projectId` (string, required)
    The ID of the project.

  - `batchId` (string, required)
    The ID of the batch.

## Response 200:

  - `200` (unknown)
    A batch call summary

## Response 200 fields (application/json):

  - `batchId` (string, required)
    Unique identifier of the batch (ULID).

  - `sessionCount` (integer, required)
    Total number of call sessions requested in this batch.
    Example: 100

  - `endTime` (string)
    Timestamp (RFC 3339) when the batch finished processing (all call sessions reached a final state). Returns

Omitted if the batch is still in progress or has not completed yet.

  - `queued` (integer, required)
    Number of call sessions that are queued and waiting to be initiated (not yet in progress).
    Example: 5

  - `inProgress` (integer, required)
    Number of call sessions that are in progress.
    Example: 2

  - `completed` (integer, required)
    Number of call sessions that have completed successfully.
    Example: 93

  - `expired` (integer, required)
    Number of queued call sessions that were not initiated before the batch TTL (`ttlSeconds`) elapsed and therefore expired.
    Example: 0

  - `ttlSeconds` (integer)
    Batch time-to-live (TTL) in seconds. The maximum amount of time the platform will keep attempting to start queued call sessions in this batch.
When the TTL expires, any call sessions that have not yet been initiated will stop being processed (calls already in progress are not affected).
    Example: 10800

  - `requestedCps` (integer, required)
    Requested maximum call initiation rate, in calls per second (CPS), for this batch.
Actual CPS may be lower depending on routing, carrier, and platform capacity, as well as account limitations.
    Example: 10

## Response 400:

  - `400` (unknown)
    Invalid request parameters.

## Response 400 fields (application/problem+json):

  - `type` (any, required)
    Enum: "https://api.sinch.com/docs/errors/bad-request"

  - `title` (any, required)
    Enum: "Bad Request"

  - `detail` (any, required)
    Example: The request body is invalid or malformed.

  - `instance` (any, required)
    Example: /v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA

## Response 401:

  - `401` (unknown)
    Authentication failed — token missing, invalid, or expired.

## Response 401 fields (application/problem+json):

  - `type` (any, required)
    Enum: "https://api.sinch.com/docs/errors/unauthorized"

  - `title` (any, required)
    Enum: "Unauthorized"

  - `detail` (any, required)
    Example: The token is missing, invalid, or has expired.

  - `instance` (any, required)
    Example: /v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA

## Response 401 headers (application/problem+json):

  - `WWW-Authenticate` (string)
    RFC 7235 challenge. Indicates the required authentication scheme and, for expired tokens, provides an error hint.
    Example: Bearer realm="sinch", error="invalid_token", error_description="Token has expired"

## Response 403:

  - `403` (unknown)
    Forbidden.

## Response 403 fields (application/problem+json):

  - `type` (any, required)
    Enum: "https://api.sinch.com/docs/errors/forbidden"

  - `title` (any, required)
    Enum: "Forbidden"

  - `detail` (any, required)
    Example: The request was rejected.

  - `instance` (any, required)
    Example: /v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA

## Response 404:

  - `404` (unknown)
    Resource not found.

## Response 404 fields (application/problem+json):

  - `type` (any, required)
    Enum: "https://api.sinch.com/docs/errors/not-found"

  - `title` (any, required)
    Enum: "Not Found"

  - `detail` (any, required)
    Example: The requested resource was not found.

  - `instance` (any, required)
    Example: /v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA

## Response 429:

  - `429` (unknown)
    Too many requests — rate limit exceeded.

## Response 429 fields (application/problem+json):

  - `type` (any, required)
    Enum: "https://api.sinch.com/docs/errors/too-many-requests"

  - `title` (any, required)
    Enum: "Too Many Requests"

  - `detail` (any, required)
    Example: Rate limit exceeded. Please slow down your request rate and retry after the indicated period.

  - `instance` (any, required)
    Example: /v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls

## Response 429 headers (application/problem+json):

  - `Retry-After` (integer)
    Number of seconds to wait before retrying the request.
    Example: 60

## Response 500:

  - `500` (unknown)
    Internal server error occurred.

## Response 500 fields (application/problem+json):

  - `type` (any, required)
    Enum: "https://api.sinch.com/docs/errors/internal-server-error"

  - `title` (any, required)
    Enum: "Internal Server Error"

  - `detail` (any, required)
    Example: An unexpected error occurred on the server.

  - `instance` (any, required)
    Example: /v2/projects/5c5bf2b1-35ae-4825-ab89-457e07bb60e6/calls/01ARZ3NDEKTSV4RRFFQ69G5FAA

