Create Issue in Repository

Request

POST

https://api.sourcecraft.tech/repos/{org_slug}/{repo_slug}/issues

Path parameters

Name

Description

org_slug

Type: string

Example: ``

repo_slug

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: example

assignee_id

Type: string

Example: example

deadline

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

description

Type: string

Example: example

label_ids

Type: string[]

Example
[
  "example"
]

label_slugs

Type: string[]

Example
[
  "example"
]

linked_pr_ids

Type: string[]

Example
[
  "example"
]

linked_pr_slugs

Type: string[]

Example
[
  "example"
]

milestone_id

Type: string

Example: example

milestone_slug

Type: string

Example: example

priority

Type: Priority

Enum: trivial, minor, normal, critical, blocker

status_slug

Type: string

Example: example

visibility

Type: Issue.Visibility

Enum: public, private

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
{
  "id": "example",
  "slug": "example"
}

author

Type: UserEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

completed_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

created_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

deadline

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

description

Type: string

Example: example

id

Type: string

Example: example

labels

Type: LabelEmbedded[]

Example
[
  {
    "id": "example",
    "slug": "example",
    "name": "example",
    "color": "example"
  }
]

linked_prs

Type: PullRequestEmbedded[]

Example
[
  {
    "id": "example",
    "slug": "example"
  }
]

milestone

Type: MilestoneEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

priority

Type: Priority

Enum: trivial, minor, normal, critical, blocker

repository

Type: RepositoryEmbedded

Example
{
  "id": "example",
  "slug": "example",
  "organization": {
    "id": "example",
    "slug": "example"
  }
}

slug

Type: string

Example: example

started_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

status

Type: IssueStatus

Example
{
  "id": "example",
  "slug": "example",
  "name": "example",
  "status_type": "initial"
}

title

Type: string

Example: example

updated_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

updated_by

Type: UserEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

visibility

Type: Issue.Visibility

Enum: public, private

StatusType

Type: string

Enum: initial, in_progress, paused, completed, cancelled

IssueStatus

Name

Description

id

Type: string

Example: example

name

Type: string

Example: example

slug

Type: string

Example: example

status_type

Type: StatusType

Enum: initial, in_progress, paused, completed, cancelled

Example
{
  "id": "example",
  "slug": "example",
  "name": "example",
  "status_type": "initial"
}

UserEmbedded

Name

Description

id

Type: string

Example: example

slug

Type: string

Example: example

Example
{
  "id": "example",
  "slug": "example"
}

LabelEmbedded

Name

Description

color

Type: string

Example: example

id

Type: string

Example: example

name

Type: string

Example: example

slug

Type: string

Example: example

Example
{
  "id": "example",
  "slug": "example",
  "name": "example",
  "color": "example"
}

RepositoryEmbedded

Name

Description

id

Type: string

Example: example

organization

Type: OrganizationEmbedded

Example
{
  "id": "example",
  "slug": "example"
}

slug

Type: string

Example: 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

[additional]

Type: string

Example: example

Example
{}

error_code

Type: string

Example: example

message

Type: string

Example: example

request_id

Type: string

Example: example

Предыдущая
Следующая