s.id Public API
  1. Links
  • Introduction
  • v1
    • Links
      • List Links
        GET
      • Create Link
        POST
      • Link Detail by Short
        GET
      • Link Detail
        GET
      • Update Link
        POST
      • Protected Link
        POST
      • Dispossable Link
        POST
      • Archive Link
        PUT
      • Unarchive Link
        PUT
    • Quota
      GET
    • Me
      GET
  • Ping
    GET
  1. Links

Update Link

POST
https://api.s.id/v1/links/{id}

Request

Path Params
id
string 
required
Header Params
X-Auth-Id
string 
required
X-Auth-Key
string 
required
Body Params application/json
long_url
string 
required
short
string 
required
title
string 
optional
Example
{
  "long_url": "http://yourexamplelink.id/this-very-long-url",
  "short": "1JT0",
  "title": "Your Title"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.s.id/v1/links/' \
--header 'X-Auth-Id;' \
--header 'X-Auth-Key;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "long_url": "http://yourexamplelink.id/this-very-long-url",
    "short": "1JT0",
    "title": "Your Title"
}'

Responses

🟢200OK
application/json
Body
code
integer 
required
message
string 
required
data
object (LinkItem) 
required
id
integer 
required
created_at
string <date-time>
required
updated_at
string <date-time>
required
short
string 
required
long_url
string 
required
blocked
boolean 
required
blocked_reason
string 
optional
blocked_at
string <date-time>
required
microsite
boolean 
required
protected
boolean 
required
disposable
boolean 
required
adult
boolean 
required
archive_at
string <date-time>
required
Example
{
  "code": 200,
  "message": "link_updated",
  "data": {
    "_id": "6673610e22b2eaa01abe4873",
    "id": 414736,
    "created_at": "2024-06-19T22:51:58.036Z",
    "updated_at": "2024-06-20T06:12:42.746285+07:00",
    "short": "X2345",
    "long_url": "https://example.com/test-link2",
    "blocked": null,
    "blocked_reason": null,
    "blocked_at": null,
    "microsite": false,
    "protected": false,
    "disposable": false,
    "adult": false,
    "archive_at": null
  }
}
Modified at 2024-06-19 12:23:17
Previous
Link Detail
Next
Protected Link
Built with