> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/developers/gitbook-api/api-reference/change-requests/change-request-content/get-a-specific-file-in-a-change-request-by-its-id.md).

# Get a specific file in a change request by its ID

Retrieves metadata for a single file (image or attachment) stored in the change request's current revision. Use this to get the download URL or details of a specific asset referenced by a page in the change request.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"change-request-content","description":"Retrieve or update the pages and files tied to an open change request. This lets you preview alterations and merge them when ready.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"oauth":["space:read"]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"oauth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://oauth.gitbook.com/authorize","tokenUrl":"https://oauth.gitbook.com/token","scopes":{"user:read":"Read your GitBook user profile.","organization:read":"Read organization settings and metadata.","organization:write":"Create and update organization settings.","organization:members:read":"Read organization members, invites and link invites.","organization:members:write":"Manage organization members, invites and link invites.","organization:ask":"Ask AI questions across an organization's content.","organization:search":"Search across an organization's content.","space:read":"Read spaces and their content.","space:write":"Create, update and delete spaces and their content, including imports.","space:permissions:read":"Read space permissions.","space:permissions:write":"Manage space permissions.","change-request:merge":"Merge change requests, publishing their changes to the space.","site:read":"Read sites and their settings.","site:write":"Create, update and delete sites, sections and their settings.","site:publish":"Publish and unpublish sites, controlling their public exposure.","site:permissions:read":"Read site permissions.","site:permissions:write":"Manage site permissions.","site:auth:read":"Read site authentication and security configuration.","site:auth:write":"Manage site authentication and security configuration.","site:insights:read":"Read site analytics and insights.","site:ask":"Ask AI questions across a site's content.","site:search":"Search across a site's content.","openapi:read":"Read OpenAPI specifications.","openapi:write":"Create, update and delete OpenAPI specifications."}}}}},"parameters":{"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}},"changeRequestId":{"name":"changeRequestId","in":"path","required":true,"description":"The unique ID of the change request or its number identifier in the space","schema":{"$ref":"#/components/schemas/EntityId"}},"fileId":{"name":"fileId","in":"path","required":true,"description":"The unique id of the file","schema":{"$ref":"#/components/schemas/EntityId"}},"revisionMetadata":{"name":"metadata","in":"query","description":"If `false` is passed, \"git\" mutable metadata will not returned. Passing `false` can optimize performances of the lookup.","schema":{"type":"boolean","default":true}},"revisionComputed":{"name":"computed","in":"query","description":"If `false` is passed, content will not be computed","schema":{"type":"boolean","default":true}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"RevisionFile":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"downloadURL":{"type":"string"},"size":{"type":"number"},"dimensions":{"type":"object","description":"For images, it contains the dimensions of it.","properties":{"width":{"type":"number"},"height":{"type":"number"}},"required":["width","height"]},"git":{"$ref":"#/components/schemas/GitSyncBlob"}},"required":["id","name","contentType","downloadURL","size"]},"GitSyncBlob":{"type":"object","properties":{"oid":{"type":"string","description":"SHA for the blob"},"path":{"type":"string","description":"Path of the blob in the Git tree"}},"required":["oid","path"]}}},"paths":{"/spaces/{spaceId}/change-requests/{changeRequestId}/content/files/{fileId}":{"get":{"operationId":"getFileInChangeRequestById","summary":"Get a specific file in a change request by its ID","description":"Retrieves metadata for a single file (image or attachment) stored in the change request's current revision. Use this to get the download URL or details of a specific asset referenced by a page in the change request.","tags":["change-request-content"],"parameters":[{"$ref":"#/components/parameters/spaceId"},{"$ref":"#/components/parameters/changeRequestId"},{"$ref":"#/components/parameters/fileId"},{"$ref":"#/components/parameters/revisionMetadata"},{"$ref":"#/components/parameters/revisionComputed"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevisionFile"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/developers/gitbook-api/api-reference/change-requests/change-request-content/get-a-specific-file-in-a-change-request-by-its-id.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
