Set a resource for an organization Copilot Space
Updates the metadata of a resource in a specific Copilot Space owned by an organization. The authenticated user must have write permissions on the space.
OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.
Fine-grained tokens and GitHub App user access tokens must have been granted access to the organization that owns the space. They must also have been granted access to every repository referenced by resources in the space, including the resource being updated.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The organization name. The name is not case sensitive.
The unique identifier of the Copilot Space.
The unique identifier of the resource.
Request Body required
Section titled “ Request Body required ”object
Updated resource-specific metadata.
object
Examples
{ "metadata": { "name": "updated-notes.txt", "text": "Updated content" }}Responses
Section titled “ Responses ”Response
A resource attached to a Copilot Space.
object
The unique identifier of the resource.
The type of the resource.
The ID of the associated chat attachment, if any.
Resource-specific metadata. The keys and values depend on the resource type.
object
The date and time the resource was created.
The date and time the resource was last updated.
Examples
{ "id": 1, "resource_type": "free_text", "copilot_chat_attachment_id": null, "metadata": { "name": "updated-notes.txt", "text": "Updated content" }, "created_at": "2025-01-01T00:00:00Z", "updated_at": "2025-01-01T12:00:00Z"}Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Validation Error
object
object
Example generated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}