Create an autolink reference for a repository
POST
/repos/{owner}/{repo}/autolinks https://api.github.com
Users with admin access to the repository can create an autolink.
Parameters
path Path Parameters
| Name | Type |
|---|---|
owner
required
The account owner of the repository. The name is not case sensitive. | string |
repo
required
The name of the repository without the | string |
Request Body
application/json
required
{ key_prefix: string;url_template: string;is_alphanumeric?: boolean; }
Responses
201 application/json
response
interface Autolink {
id: number;
key_prefix: string;
url_template: string;
is_alphanumeric: boolean;
updated_at?: string | null;
}
id: number;
key_prefix: string;
url_template: string;
is_alphanumeric: boolean;
updated_at?: string | null;
}
Client Errors
422 application/json
Validation failed, or the endpoint has been spammed.
interface ValidationError {
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}
message: string;
documentation_url: string;
errors?: {
resource?: string;
field?: string;
message?: string;
code: string;
index?: number;
value?: string[] | string | number | null;
}[];
}