Use the REST API to add autolinks to external resources.
To help streamline your workflow, you can use the REST API to add autolinks to external resources like JIRA issues and Zendesk tickets. For more information, see Configuring autolinks to reference external resources.
GitHub Apps require repository administration permissions with read or write access to use these endpoints.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /repos/{owner}/{repo}/autolinks
Gets all autolinks that are configured for a repository.
Information about autolinks are only available to repository administrators.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/autolinks
Response schema (Status: 200):
Array of Autolink reference:
id: required, integerkey_prefix: required, stringurl_template: required, stringis_alphanumeric: required, booleanupdated_at: string or null, format: date-timePOST /repos/{owner}/{repo}/autolinks
Users with admin access to the repository can create an autolink.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
key_prefix (string) (required)
This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit.
url_template (string) (required)
The URL must contain
is_alphanumeric (boolean)
Whether this autolink reference matches alphanumeric characters. If true, the
Default: true
201 - Created
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/autolinks \
-d '{
"key_prefix": "TICKET-",
"url_template": "https://example.com/TICKET?query=<num>",
"is_alphanumeric": true
}'
Response schema (Status: 201):
id: required, integerkey_prefix: required, stringurl_template: required, stringis_alphanumeric: required, booleanupdated_at: string or null, format: date-timeGET /repos/{owner}/{repo}/autolinks/{autolink_id}
This returns a single autolink reference by ID that was configured for the given repository.
Information about autolinks are only available to repository administrators.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
autolink_id (integer) (required)
The unique identifier of the autolink.
200 - OK
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/autolinks/AUTOLINK_ID
Response schema (Status: 200):
Same response schema as Create an autolink reference for a repository.
DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}
This deletes a single autolink reference by ID that was configured for the given repository.
Information about autolinks are only available to repository administrators.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
autolink_id (integer) (required)
The unique identifier of the autolink.
204 - No Content
404 - Resource not found
Request:
curl -L \
-X DELETE \
https://api.github.com/repos/OWNER/REPO/autolinks/AUTOLINK_ID
Response schema (Status: 204):