Create Issue in Repository (By Repo ID)
Request
POST
https://api.sourcecraft.tech/repos/id:{repo_id}/issues
Path parameters
|
Name |
Description |
|
repo_id |
Type: string Example: `` |
Query parameters
|
Name |
Description |
|
silent |
Type: boolean do not notify subscribers |
Body
application/json
{
"title": "example",
"description": "example",
"status_slug": "example",
"priority": "trivial",
"assignee_id": "example",
"milestone_id": "example",
"milestone_slug": "example",
"visibility": "public",
"label_ids": [
"example"
],
"label_slugs": [
"example"
],
"linked_pr_ids": [
"example"
],
"linked_pr_slugs": [
"example"
],
"deadline": "2025-01-01T00:00:00Z"
}
|
Name |
Description |
|
title |
Type: string Example: |
|
assignee_id |
Type: string Example: |
|
deadline |
Type: string<date-time> Example: |
|
description |
Type: string Example: |
|
label_ids |
Type: string[] Example
|
|
label_slugs |
Type: string[] Example
|
|
linked_pr_ids |
Type: string[] Example
|
|
linked_pr_slugs |
Type: string[] Example
|
|
milestone_id |
Type: string Example: |
|
milestone_slug |
Type: string Example: |
|
priority |
Type: Priority Enum: |
|
status_slug |
Type: string Example: |
|
visibility |
Type: Issue.Visibility Enum: |
Priority
Type: string
Enum: trivial, minor, normal, critical, blocker
Issue.Visibility
Type: string
Enum: public, private
Responses
201 Created
A successful response.
Body
application/json
{
"id": "example",
"slug": "example",
"title": "example",
"description": "example",
"status": {
"id": "example",
"slug": "example",
"name": "example",
"status_type": "initial"
},
"author": {
"id": "example",
"slug": "example"
},
"updated_by": null,
"created_at": "2025-01-01T00:00:00Z",
"updated_at": "2025-01-01T00:00:00Z",
"assignee": null,
"labels": [
{
"id": "example",
"slug": "example",
"name": "example",
"color": "example"
}
],
"linked_prs": [
{
"id": "example",
"slug": "example"
}
],
"priority": "trivial",
"visibility": "public",
"milestone": {
"id": "example",
"slug": "example"
},
"deadline": "2025-01-01T00:00:00Z",
"started_at": "2025-01-01T00:00:00Z",
"completed_at": "2025-01-01T00:00:00Z",
"repository": {
"id": "example",
"slug": "example",
"organization": {
"id": "example",
"slug": "example"
}
}
}
|
Name |
Description |
|
assignee |
Type: UserEmbedded Example
|
|
author |
Type: UserEmbedded Example
|
|
completed_at |
Type: string<date-time> Example: |
|
created_at |
Type: string<date-time> Example: |
|
deadline |
Type: string<date-time> Example: |
|
description |
Type: string Example: |
|
id |
Type: string Example: |
|
labels |
Type: LabelEmbedded[] Example
|
|
linked_prs |
Type: PullRequestEmbedded[] Example
|
|
milestone |
Type: MilestoneEmbedded Example
|
|
priority |
Type: Priority Enum: |
|
repository |
Type: RepositoryEmbedded Example
|
|
slug |
Type: string Example: |
|
started_at |
Type: string<date-time> Example: |
|
status |
Type: IssueStatus Example
|
|
title |
Type: string Example: |
|
updated_at |
Type: string<date-time> Example: |
|
updated_by |
Type: UserEmbedded Example
|
|
visibility |
Type: Issue.Visibility Enum: |
StatusType
Type: string
Enum: initial, in_progress, paused, completed, cancelled
IssueStatus
|
Name |
Description |
|
id |
Type: string Example: |
|
name |
Type: string Example: |
|
slug |
Type: string Example: |
|
status_type |
Type: StatusType Enum: |
Example
{
"id": "example",
"slug": "example",
"name": "example",
"status_type": "initial"
}
UserEmbedded
|
Name |
Description |
|
id |
Type: string Example: |
|
slug |
Type: string Example: |
Example
{
"id": "example",
"slug": "example"
}
LabelEmbedded
|
Name |
Description |
|
color |
Type: string Example: |
|
id |
Type: string Example: |
|
name |
Type: string Example: |
|
slug |
Type: string Example: |
Example
{
"id": "example",
"slug": "example",
"name": "example",
"color": "example"
}
RepositoryEmbedded
|
Name |
Description |
|
id |
Type: string Example: |
|
organization |
Type: OrganizationEmbedded Example
|
|
slug |
Type: string Example: |
Example
{
"id": "example",
"slug": "example",
"organization": {
"id": "example",
"slug": "example"
}
}
default
Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme
Body
application/json
{
"error_code": "example",
"message": "example",
"request_id": "example",
"details": {}
}
|
Name |
Description |
||
|
details |
Type: Optional details. Exact structure depends on error_code
Example
|
||
|
error_code |
Type: string Example: |
||
|
message |
Type: string Example: |
||
|
request_id |
Type: string Example: |