v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
repos

Create an autolink reference for a repository

Users with admin access to the repository can create an autolink.

post/repos/{owner}/{repo}/autolinks

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

Request body

key_prefixstring required

This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit.

url_templatestring required

The URL must contain <num> for the reference number. <num> matches different characters depending on the value of is_alphanumeric.

is_alphanumericboolean

Whether this autolink reference matches alphanumeric characters. If true, the <num> parameter of the url_template matches alphanumeric characters A-Z (case insensitive), 0-9, and -. If false, this autolink reference only matches numeric characters.

Response

response

idinteger required
key_prefixstring required

The prefix of a key that is linkified.

url_templatestring required

A template for the target URL that is generated if a key was found.

is_alphanumericboolean required

Whether this autolink reference matches alphanumeric characters. If false, this autolink reference only matches numeric characters.

updated_atstring date-time nullable

Example response

{
  "id": 3,
  "key_prefix": "TICKET-",
  "url_template": "https://example.com/TICKET?query=<num>",
  "is_alphanumeric": true
}