---
updatedAt: 2026-08-25T16:15:22.000Z
agentTools:
  projectIndex: https://developers.jasper.ai/llms.txt
---

# Retrieve a source by ID

Retrieve a single source in your workspace by ID. Products reference sources by ID, so use this to expand one into its name, type, and value.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "paths": {
    "/v1/context-sources/{sourceId}": {
      "get": {
        "description": "Retrieve a single source in your workspace by ID. Products reference sources by ID, so use this to expand one into its name, type, and value.",
        "operationId": "getContextSourceById",
        "parameters": [
          {
            "name": "sourceId",
            "required": true,
            "in": "path",
            "description": "The source's unique ID",
            "schema": {
              "example": "csc_2ee766eaa4ef48e59da1d9602bfecf2d",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Source details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetContextSourceResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access to the workspace."
          },
          "403": {
            "description": "Product IQ is not enabled for this workspace."
          },
          "404": {
            "description": "Not found. The source does not exist in your workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContextSource404Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error. Unable to get source.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContextSource500Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-API-Key": []
          },
          {
            "oauth2": [
              "user"
            ]
          }
        ],
        "summary": "Retrieve a source by ID",
        "tags": [
          "Context Sources"
        ]
      }
    }
  },
  "info": {
    "title": "Jasper API",
    "description": "Jasper API",
    "version": "1.0",
    "contact": {}
  },
  "tags": [
    {
      "name": "Context Sources",
      "description": ""
    }
  ],
  "servers": [
    {
      "url": "https://api.jasper.ai"
    }
  ],
  "components": {
    "securitySchemes": {
      "X-API-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Workspace authentication using API key tokens in the X-API-Key header."
      },
      "oauth2": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://api.jasper.ai/oauth2/authorize",
            "tokenUrl": "https://api.jasper.ai/oauth2/token",
            "refreshUrl": "https://api.jasper.ai/oauth2/token",
            "scopes": {
              "user:read": "Read user information",
              "user": "Read and write user information"
            }
          }
        },
        "description": "User-level authentication using OAuth bearer tokens in the Authorization header."
      }
    },
    "schemas": {
      "ContextSourceResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The source ID. Reference this value when setting a `CONTEXT_SOURCE_LIST` attribute on a Product (e.g. `Images`) — note those attributes currently accept `FILE` sources only.",
            "example": "csc_2ee766eaa4ef48e59da1d9602bfecf2d"
          },
          "name": {
            "type": "string",
            "description": "The display name, derived at creation and not settable: the file name for an uploaded file, the URL for a URL, the first few words for text, or the item name for Knowledge.",
            "example": "widget-front.png"
          },
          "type": {
            "type": "string",
            "description": "The source type. On create this always matches the requested `type`.",
            "enum": [
              "FILE",
              "TEXT",
              "URL",
              "KNOWLEDGE"
            ],
            "example": "FILE"
          },
          "value": {
            "type": "string",
            "description": "The source URL for `URL` sources, or the wrapped Knowledge item ID for `KNOWLEDGE` sources. Omitted for `FILE` and `TEXT`, which hold their content in storage.",
            "example": "https://example.com/product"
          }
        },
        "required": [
          "id",
          "name",
          "type"
        ]
      },
      "ContextSource500Error": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 500
          },
          "message": {
            "type": "string",
            "example": "Couldn't create source"
          },
          "error": {
            "type": "string",
            "example": "Internal Server Error"
          }
        },
        "required": [
          "statusCode",
          "message",
          "error"
        ]
      },
      "GetContextSourceResponseDto": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "example": "8393f82b3f6a4f6e8a405777b9305254"
          },
          "resource": {
            "type": "string",
            "example": "knowledge"
          },
          "data": {
            "$ref": "#/components/schemas/ContextSourceResource"
          }
        },
        "required": [
          "requestId",
          "resource",
          "data"
        ]
      },
      "ContextSource404Error": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 404
          },
          "message": {
            "type": "string",
            "example": "Context source not found: csc_2ee766eaa4ef48e59da1d9602bfecf2d"
          },
          "error": {
            "type": "string",
            "example": "Not Found"
          }
        },
        "required": [
          "statusCode",
          "message",
          "error"
        ]
      }
    }
  },
  "x-readme": {
    "metrics-enabled": false
  }
}
```