# Compare two templates

Compare two templates.

Endpoint: POST /v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}/compare
Version: 1.2.91
Security: BasicAuth, BearerAuth, OAuth2Production

## Security:

  - `BasicAuth` (unknown)
    http basic

  - `BearerAuth` (unknown)
    http bearer JWT

  - `OAuth2Production` (unknown)
    oauth2

## Path parameters:

  - `projectId` (string, required)
    The unique ID of the project. You can find this on the Sinch Dashboard.

  - `templateName` (string, required)
    The unique name of the template.

  - `languageCode` (string, required)
    The language code of the specific template.

## Request body:

  - `application/json` (unknown)
    Compare data

## Request fields (application/json):

  - `templates` (array, required)
    List of templates

  - `templates.templateName` (string, required)
    Template name

  - `templates.templateLanguage` (string, required)
    Template language
    Enum: "AF", "AR", "AZ", "BG", "BN", "CA", "CS", "DA", "DE", "EL", "EN", "EN_GB", "EN_US", "ES", "ES_AR", "ES_ES", "ES_MX", "ES_UY", "ET", "FA", "FI", "FIL", "FR", "GA", "GU", "HA", "HE", "HI", "HR", "HU", "ID", "IT", "JA", "KA", "KK", "KN", "KO", "KY_KG", "LO", "LT", "LV", "MK", "ML", "MR", "MS", "NB", "NL", "PA", "PL", "PT_BR", "PT_PT", "RO", "RU", "RW_RW", "SK", "SL", "SQ", "SR", "SV", "SW", "TA", "TE", "TH", "TR", "UK", "UR", "UZ", "VI", "ZH_CN", "ZH_HK", "ZH_TW", "ZU", "UNRECOGNIZED"

  - `timeframe` (string)
    Timeframes are limited to 7, 30, 60 and 90 day lookbacks from the time of the request
    Enum: "30", "60", "7", "90"

  - `endTimestamp` (number)
    End of timeframe (default: now)

## Request examples:

  - `Body request` (unknown)
    Example body request compare templates.

## Response 200:

  - `200` (unknown)
    Compared template response

## Response 200 fields (application/json):

  - `templates` (array, required)
    List of templates

  - `templates.name` (string, required)
    Template name

  - `templates.language` (string, required)
    Template language
    Enum: "AF", "AR", "AZ", "BG", "BN", "CA", "CS", "DA", "DE", "EL", "EN", "EN_GB", "EN_US", "ES", "ES_AR", "ES_ES", "ES_MX", "ES_UY", "ET", "FA", "FI", "FIL", "FR", "GA", "GU", "HA", "HE", "HI", "HR", "HU", "ID", "IT", "JA", "KA", "KK", "KN", "KO", "KY_KG", "LO", "LT", "LV", "MK", "ML", "MR", "MS", "NB", "NL", "PA", "PL", "PT_BR", "PT_PT", "RO", "RU", "RW_RW", "SK", "SL", "SQ", "SR", "SV", "SW", "TA", "TE", "TH", "TR", "UK", "UR", "UZ", "VI", "ZH_CN", "ZH_HK", "ZH_TW", "ZU", "UNRECOGNIZED"

  - `templates.blockOrder` (number, required)
    Order of block rate

  - `templates.messageSends` (number, required)
    Message send number

  - `templates.topBlockReason` (string, required)
    Block reason
    Enum: "NO_LONGER_NEEDED", "NO_REASON", "NO_REASON_GIVEN", "NO_SIGN_UP", "OFFENSIVE_MESSAGES", "OTHER", "OTP_DID_NOT_REQUEST", "SPAM", "UNKNOWN_BLOCK_REASON", "UNRECOGNIZED"

## Response 400:

  - `400` (unknown)
    BadRequest

## Response 400 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: invalid_input

  - `message` (string)
    Human readable message.
    Example: Invalid input.

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: Correct the validation errors and submit again.

  - `additionalInformation` (object)
    Additional information for error.
    Example: {"validationErrors":["templates must be an array","templates must contain no more than 1 elements","templates must contain at least 1 elements"]}

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: unauthorized_error

  - `message` (string)
    Human readable message.
    Example: Unauthorized error.

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: Verify that projectId is correct.

## Response 404:

  - `404` (unknown)
    NotFound

## Response 404 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: template_not_found

  - `message` (string)
    Human readable message.
    Example: Template not found.

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: Verify that the parameters are correct.

## Response 409:

  - `409` (unknown)
    Conflict

## Response 409 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: templates_not_eligible_for_comparison

  - `message` (string)
    Human readable message.
    Example: Templates not eligible for comparison.

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: Templates must have been sent at least 1,000 times in the specified timeframe.

## Response 500:

  - `500` (unknown)
    InternalServerError

## Response 500 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: internal_error

  - `message` (string)
    Human readable message.
    Example: Internal server error.

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: Please wait and try again, if the error persist please contact support.

## Response 200 examples:

  - `Compare template response` (unknown)
    Response when successfully compared templates.

