---
title: "Upload new context"
method: POST
path: "/context-api/v2/projects/{projectId}/contexts"
tags: ["Context"]
---

# Upload new context

`POST /context-api/v2/projects/{projectId}/contexts`

[Visual Context](https://help.smartling.com/hc/en-us/articles/360057484273-Overview-of-Visual-Context) provides a visual representation of the source content to Translators and Editors as
they are performing their work, and is a very effective way to ensure high-quality translations. Visual
Context is displayed in the Smartling CAT Tool - the environment in which translations are performed.

The following context types are supported via the Smartling API:

- **HTML**: HTML files or files with content type text/html
- **IMAGE**: Image files
- **VIDEO**:
  - Video file
  - Link to video, such as:
    - YouTube link
    - Vimeo link
    - Direct link to an .mp4 file

Context type is not specified directly, but rather, inferred via
analyzing the request body.

This endpoint accepts *multipart/form-data* request body.

## Path parameters

- `projectId` string, uuid, required

## Response `200`

OK

- ContextResponse
  - `response` object
    - `code` 'SUCCESS' — Code of the completed operation.
    - `data` object — Basic information about the context.
      - `contextType` 'IMAGE' | 'HTML' | 'VIDEO' — Type of context file.
      - `contextUid` string — Unique identifier for the context.
      - `created` string, date-time — A date when the context was created. Format: ISO8601 date and time string
      - `name` string — File name for IMAGE context, URL for HTML Context and video URL for VIDEO context.

## Other responses

- `400` — Validation error
- `401` — Provided credentials are not valid.
- `429` — Too many simultaneous API requests.
- `500` — Unexpected error

---

[API](https://skmtc.net/smartling/apis/smartling-rest-api-reference.md) · [All operations](https://skmtc.net/smartling/apis/smartling-rest-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smartling/smartling-rest-api-reference/versions/2a73d11e9b98/schema)
