Reopen a closed survey, with a new closing date or none (logged)
POST
/api/v1/workspaces/{workspace}/surveys/{surveyId}/reopen
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://reputecast.example.com/api/v1/workspaces/acme-newsletter/surveys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reopen"
payload := strings.NewReader("{ \"close\": { \"date\": \"example\", \"mode\": \"date\", \"time\": \"example\" } }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://reputecast.example.com/api/v1/workspaces/acme-newsletter/surveys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reopen';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"close":{"date":"example","mode":"date","time":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://reputecast.example.com/api/v1/workspaces/acme-newsletter/surveys/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reopen \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "close": { "date": "example", "mode": "date", "time": "example" } }'Permission: forms:edit
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspace
required
Workspace slug
string
Workspace slug
surveyId
required
Survey id
string format: uuid
Survey id
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
close
object
date
string
mode
required
string
time
string
Responses
Section titled “Responses”OK
Media typeapplication/json
object
canEdit
required
boolean
closedAt
string format: date-time
closedBy
string
closesAt
string format: date-time
completed
required
integer format: int64
createdAt
required
string format: date-time
createdBy
required
string
description
required
string
editHelpers
required
Array<string>
id
required
string
linked
required
Array<object>
object
campaignId
required
string
name
required
string
recipients
integer format: int64
sentAt
string format: date-time
status
required
string
via
required
string
name
required
string
number
required
integer format: int64
problems
required
Array<object>
object
field
required
string
message
required
string
question
string
publishedAt
string format: date-time
publishedBy
string
questions
required
Array<object>
object
answers
required
Array<object>
object
key
required
integer format: int64
label
required
string
tag
string
description
string
faces
integer format: int64
high
string
key
required
string
low
string
nps
boolean
required
required
boolean
requiredText
string
save
required
object
field
string
to
required
string
text
required
string
type
required
string
settings
required
object
acceptNonContacts
required
boolean
close
required
object
date
string
mode
required
string
time
string
oneResponse
required
boolean
thanks
string
timezone
string
slug
required
string
started
required
integer format: int64
status
required
string
updatedAt
required
string format: date-time
url
required
string
variable
required
string
Example
{ "linked": [ { "via": "link" } ], "questions": [ { "save": { "to": "none" }, "type": "single" } ], "settings": { "close": { "mode": "date" } }, "status": "draft"}default
Section titled “default”Error
Media typeapplication/problem+json
object
code
Stable error code, e.g. permission_denied
string
detail
A human-readable explanation specific to this occurrence of the problem.
string
errors
Optional list of individual error details
Array<object>
object
location
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
string
message
Error message text
string
value
The value at the given location
helpers
Members who hold the missing permission
Array<string>
instance
A URI reference that identifies the specific occurrence of the problem.
string format: uri
meta
object
key
additional properties
permission
The missing permission key
string
status
HTTP status code
integer format: int64
title
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
string
type
A URI reference to human-readable documentation for the error.
string format: uri
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}