{"meta":{"title":"리포지토리 자동 링크에 대한 REST API 엔드포인트","intro":"REST API를 사용하여 외부 리소스에 자동 링크를 추가합니다.","product":"REST API","breadcrumbs":[{"href":"/ko/rest","title":"REST API"},{"href":"/ko/rest/repos","title":"리포지토리"},{"href":"/ko/rest/repos/autolinks","title":"자동 링크"}],"documentType":"article"},"body":"# 리포지토리 자동 링크에 대한 REST API 엔드포인트\n\nREST API를 사용하여 외부 리소스에 자동 링크를 추가합니다.\n\n## 리포지토리 자동 링크 정보\n\n워크플로를 간소화하기 위해 REST API를 사용하여 JIRA 이슈, Zendesk 티켓 등의 외부 리소스에 대한 자동 링크를 추가할 수 있습니다. 자세한 내용은 [외부 리소스를 참조하도록 자동 링크 구성](/ko/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources)을(를) 참조하세요.\n\nGitHub Apps에서 이러한 엔드포인트를 사용하려면 읽기 또는 쓰기 권한이 있는 리포지토리 관리 권한이 필요합니다.\n\n> \\[!NOTE]\n> 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.\n\n## Get all autolinks of a repository\n\n```\nGET /repos/{owner}/{repo}/autolinks\n```\n\nGets all autolinks that are configured for a repository.\nInformation about autolinks are only available to repository administrators.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/autolinks\n```\n\n**Response schema (Status: 200):**\n\nArray of `Autolink reference`:\n\n* `id`: required, integer\n* `key_prefix`: required, string\n* `url_template`: required, string\n* `is_alphanumeric`: required, boolean\n* `updated_at`: string or null, format: date-time\n\n## Create an autolink reference for a repository\n\n```\nPOST /repos/{owner}/{repo}/autolinks\n```\n\nUsers with admin access to the repository can create an autolink.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n#### Body parameters\n\n* **`key_prefix`** (string) (required)\n  This prefix appended by certain characters will generate a link any time it is found in an issue, pull request, or commit.\n\n* **`url_template`** (string) (required)\n  The URL must contain <num> for the reference number. <num> matches different characters depending on the value of is\\_alphanumeric.\n\n* **`is_alphanumeric`** (boolean)\n  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.\n  Default: `true`\n\n### HTTP response status codes\n\n* **201** - Created\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/repos/OWNER/REPO/autolinks \\\n  -d '{\n  \"key_prefix\": \"TICKET-\",\n  \"url_template\": \"https://example.com/TICKET?query=<num>\",\n  \"is_alphanumeric\": true\n}'\n```\n\n**Response schema (Status: 201):**\n\n* `id`: required, integer\n* `key_prefix`: required, string\n* `url_template`: required, string\n* `is_alphanumeric`: required, boolean\n* `updated_at`: string or null, format: date-time\n\n## Get an autolink reference of a repository\n\n```\nGET /repos/{owner}/{repo}/autolinks/{autolink_id}\n```\n\nThis returns a single autolink reference by ID that was configured for the given repository.\nInformation about autolinks are only available to repository administrators.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`autolink_id`** (integer) (required)\n  The unique identifier of the autolink.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/autolinks/AUTOLINK_ID\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Create an autolink reference for a repository](#create-an-autolink-reference-for-a-repository).\n\n## Delete an autolink reference from a repository\n\n```\nDELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\n```\n\nThis deletes a single autolink reference by ID that was configured for the given repository.\nInformation about autolinks are only available to repository administrators.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`autolink_id`** (integer) (required)\n  The unique identifier of the autolink.\n\n### HTTP response status codes\n\n* **204** - No Content\n\n* **404** - Resource not found\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/repos/OWNER/REPO/autolinks/AUTOLINK_ID\n```\n\n**Response schema (Status: 204):**"}