# dev.knotless.createIssue

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

Opens an issue on a repository, as the account logged in to this appview's pages.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.createIssue)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.createIssue/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.createIssue/examples)

## Definitions

### `dev.knotless.createIssue`

**Type**: `procedure`

Writes a dev.knotless.issue record in the account logged in to this appview's web pages, as `knotless issue` does: refused, with the template, when the repository has one (see dev.knotless.getTemplate) and the body follows none of it. Requires the session cookie the pages' login sets.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `body` | `string` | No | What it is about, in Markdown. |
| `images` | `array` | No | Pictures uploaded with dev.knotless.uploadImage; those the body links to are attached. |
| `repo` | `string` (at-uri) | Yes | The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it. |
| `title` | `string` | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes | The dev.knotless.issue record written. |

#### Errors

- **NotFound**: No such repository.
- **AuthenticationRequired**: No account is logged in to the pages, or its session has ended.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Writes a dev.knotless.issue record in the account logged in to this appview's web pages, as `knotless issue` does: refused, with the template, when the repository has one (see dev.knotless.getTemplate) and the body follows none of it. Requires the session cookie the pages' login sets.",
      "errors": [
        {
          "description": "No such repository.",
          "name": "NotFound"
        },
        {
          "description": "No account is logged in to the pages, or its session has ended.",
          "name": "AuthenticationRequired"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "body": {
              "description": "What it is about, in Markdown.",
              "maxLength": 20000,
              "type": "string"
            },
            "images": {
              "description": "Pictures uploaded with dev.knotless.uploadImage; those the body links to are attached.",
              "items": {
                "ref": "dev.knotless.defs#image",
                "type": "ref"
              },
              "maxLength": 32,
              "type": "array"
            },
            "repo": {
              "description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.",
              "format": "at-uri",
              "type": "string"
            },
            "title": {
              "maxGraphemes": 300,
              "maxLength": 3000,
              "type": "string"
            }
          },
          "required": [
            "repo",
            "title"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "uri": {
              "description": "The dev.knotless.issue record written.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "uri"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Opens an issue on a repository, as the account logged in to this appview's pages.",
  "id": "dev.knotless.createIssue",
  "lexicon": 1
}
```
