---
title: "Update score"
method: PUT
path: "/vocalize/2/scores"
tags: ["customer-engagement", "vocalize", "score"]
---

# Update score

`PUT /vocalize/2/scores`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/vocalize/2/scores`
- Auth: API key in header `Authorization`

This endpoint allows users to create or update their score for a specific campaign. If it is the first attempt of the user, the name parameter can be omited.

## Request body

- 1e177a7c00f43fb0cfaf8876573312572061d384022066ddec32b06770199719ScoreBase
  - `campaignId` string, uuid, required: Unique identifier of the campaign the score belongs to.
  - `userId` string, required: User ID, usually in the format of a phone number, e.g., 00387123456.
  - `name` string: Name of the participant e.g. John Smith. Maximum 300 characters long. Cannot be empty or whitespace.
  - `audioUrl` string, required: URL of the audio file used for sound matching. Must be a valid URL pointing to an audio file.
  - `languageCode` string, required: Language code of the audio file, e.g., 'en-US' for English. This should match the language of the audio file being submitted.
  - `channel` 'WHATSAPP' | 'RCS' | 'WEB' | 'UNKNOWN': Channel through which the score is submitted, e.g., 'WHATSAPP', 'WEB', etc.

## Response `200`

Score successfully created or updated

- 1e177a7c00f43fb0cfaf8876573312572061d384022066ddec32b06770199719ScoreResponse
  - `score` 1e177a7c00f43fb0cfaf8876573312572061d384022066ddec32b06770199719ScoreReturn, required
    - `campaignId` string, uuid, required: Unique identifier of the campaign the score belongs to.
    - `userId` string, required: User ID, usually in the format of a phone number, e.g., 00387123456.
    - `name` string: Name of the participant e.g. John Smith. Maximum 300 characters long. Cannot be empty or whitespace.
    - `audioUrl` string, required: URL of the audio file used for sound matching. Must be a valid URL pointing to an audio file.
    - `languageCode` string, required: Language code of the audio file, e.g., 'en-US' for English. This should match the language of the audio file being submitted.
    - `channel` 'WHATSAPP' | 'RCS' | 'WEB' | 'UNKNOWN': Channel through which the score is submitted, e.g., 'WHATSAPP', 'WEB', etc.
    - `keywordScore` number: Score for keyword matching, ranging from 0 to 1, where 1 is a perfect match.
    - `shapeScore` number: Score for shape matching, ranging from 0 to 1, where 1 is a perfect match.
    - `finalScore` integer, required: Final calculated score for this attempt, ranging from 0 to 1000.
    - `transcribedAudio` string: Text transcription of the submitted audio file.
    - `attempts` integer: Number of attempts made by the participant in the campaign.
    - `dateModified` string, date-time: Date and time when this score was last modified, in UTC.
    - `bestScore` integer, required: The highest score achieved by the participant in the campaign.
  - `stats` 1e177a7c00f43fb0cfaf8876573312572061d384022066ddec32b06770199719ScoreStats, required
    - `position` integer: Position of the participant on the leaderboard, taking into account tie-breaking.
    - `rank` integer: Position of the participant on the leaderboard, not taking into account tie-breaking.
    - `tiedWith` integer: Number of other participants tied with the same score.
    - `bestScore` integer: The highest score achieved by the participant in the campaign.
    - `attempts` integer, required: Total number of attempts made by the participant in the campaign.
    - `attemptsRemaining` integer, required: Number of attempts remaining for the participant today.
    - `nextScoreToBeat` integer: The next highest score the participant needs to beat to improve their ranking.
    - `numberOfParticipants` integer: Total number of participants in the campaign.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
