## v1 api docs

### deprecation notice

the v1 api is now deprecated, and will be removed in a future version of pastemyst. please upgrade to the v2 api as soon as possible.

### get a paste

<p class="method">GET</p> <code>/paste?id=<span class="var">{id}</span></code>

[comment]: <> (`GET /paste?id={id}`)

you can only get non private pastes this way, and the returned info is limited (you only get the code and language of the first pasty).

returned JSON body:

| field     | type   | description                                                |
|-----------|--------|------------------------------------------------------------|
| id        | string | id of the paste                                            |
| createdAt | ulong  | when the paste is created at, in unix time                 |
| code      | string | contents of the paste (first pasty) uri component encoded. |
| expiresIn | string | when the paste expires                                     |
| language  | string | language of the paste (first pasty)                        |

### create a paste

<p class="method">POST</p> <code>/paste</code>

[comment]: <> (`POST /paste`)

you can only create an anonymous paste with only one pasty this way.

required JSON body:

| field     | type   | description                                      |
|-----------|--------|--------------------------------------------------|
| code      | string | the contents of the paste uri component encoded. |
| expiresIn | string | when the paste expires                           |
| language  | string | language of the paste                            |
